|
SPRITE HIT
This command will return a one if the specified sprite has impacted against the target sprite specified.
Return Integer=SPRITE HIT(Sprite Number, Target Sprite Number)
Sprite Number
Integer
The sprite number
Target Sprite Number
Integer
This value is an integer number such as 1.
The command will return a one if the specified sprite has impacted against the target sprite specified
If a target sprite has not been specified and a value of zero has been used, this command will return the sprite number of any sprite impacting against it. The parameters should be specified using integer values.
cls
load image "man.bmp",1
sprite 1,100,100,1
sprite 2,200,200,1
wait 1000*8
do
paste sprite 1,mousex(),mousey()
if sprite hit(1,2)=1 then print "we have hit another sprite"
loop
end
SPRITE Commands Menu
Index
|